package cn.edu.nuc.bre.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 任务
 * @author 王凯
 *
 */
public class Task implements Serializable{
	/**
	 * 序列化id
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 任务id
	 */
    private Integer taskid;

    /**
     * 事务id
     */
    private Integer tid;

    /**
     * 处理部门名称
     */
    private String dname;

    /**
     * 任务状态
     */
    private Integer tstate;

    /**
     * 内容
     */
    private String tcontent;

    /**
     * 任务类型
     */
    private String tclass;

    /**
     * 处理时间
     */
    private Date tdealtime;

    public Integer getTaskid() {
        return taskid;
    }

    public void setTaskid(Integer taskid) {
        this.taskid = taskid;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public Integer getTstate() {
        return tstate;
    }

    public void setTstate(Integer tstate) {
        this.tstate = tstate;
    }

    public String getTcontent() {
        return tcontent;
    }

    public void setTcontent(String tcontent) {
        this.tcontent = tcontent;
    }

    public String getTclass() {
        return tclass;
    }

    public void setTclass(String tclass) {
        this.tclass = tclass;
    }

    public Date getTdealtime() {
        return tdealtime;
    }

    public void setTdealtime(Date tdealtime) {
        this.tdealtime = tdealtime;
    }

	@Override
	public String toString() {
		return "Task [任务id=" + taskid 
				+ ", 事务id=" + tid 
				+ ", 处理部门名称=" + dname 
				+ ", 任务状态=" + tstate 
				+ ", 内容=" + tcontent 
				+ ", 任务类型=" + tclass 
				+ ", 处理时间=" + tdealtime 
				+ "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((tid == null) ? 0 : tid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Task other = (Task) obj;
		if (tid == null) {
			if (other.tid != null)
				return false;
		} else if (!tid.equals(other.tid))
			return false;
		return true;
	}

}